﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using GrapeCity.ActiveReports.Samples.EndUserDesigner;

namespace ActiveReportsDemo.Viewers
{
    public partial class ThemeViewer : DemoBaseUserControl
    {
        public ThemeViewer()
        {
            InitializeComponent();
            //_exportButton.Enabled = false;
        }

        public override void ShowReport()
        {
            radioButton1.Checked = true;

            //GrapeCity.ActiveReports.PageReport report1= CommonFunction.CreatePageReport(CurrentReport, @"..\Theme\Style1.rdlx-theme", ReportViewer);
            //base.reportDesigner.Report = report1;

        }

        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
            GrapeCity.ActiveReports.PageReport report1 = CommonFunction.CreatePageReport(CurrentReportName, ReportViewer, @"..\Theme\Style1.rdlx-theme");
            base.reportDesigner.Report = report1;
            base.ReportWebBrowser.DocumentText = CommonFunction.getDescription(CurrentReportID);
        }

        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {
            GrapeCity.ActiveReports.PageReport report1 = CommonFunction.CreatePageReport(CurrentReportName, ReportViewer, @"..\Theme\Style2.rdlx-theme");
            base.reportDesigner.Report = report1;
            base.ReportWebBrowser.DocumentText = CommonFunction.getDescription(CurrentReportID);
        }

        private void radioButton3_CheckedChanged(object sender, EventArgs e)
        {
            GrapeCity.ActiveReports.PageReport report1 = CommonFunction.CreatePageReport(CurrentReportName, ReportViewer, @"..\Theme\Style3.rdlx-theme");
            base.reportDesigner.Report = report1;
            base.ReportWebBrowser.DocumentText = CommonFunction.getDescription(CurrentReportID);

        }

        private void button1_Click(object sender, EventArgs e)
        {
            radioButton1.Checked = true;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            radioButton2.Checked = true;
        }

        private void button3_Click(object sender, EventArgs e)
        {
            radioButton3.Checked = true;
        }

        private void ThemeViewer_Load(object sender, EventArgs e)
        {
            radioButton1.Checked = true;
        }
    }
}
